home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / Findit 1.1.2 Folder / ReadThisTextFile < prev   
Encoding:
Text File  |  1993-04-23  |  7.0 KB  |  159 lines  |  [TEXT/R*ch]

  1. FindIt
  2.  
  3. Introduction
  4.  
  5. One of the things that drives me nuts is trying to find out what header file
  6. Apple put a function prototype into. Some are obvious some are not. So I wrote
  7. a program to search through a folder, (or some folders, (or some folders inside
  8. other folders)), full of text files for a text string.
  9.  
  10. If you find this program useful send me a post card or an E-mail message. If
  11. you think this is a stupid program send me a postcard or an E-mail message and
  12. tell me why.
  13.  
  14. Instructions
  15.  
  16. Just drag a folder onto the FindIt icon. It is OK if there are some non-text
  17. files in the folder FindIt will skip those.
  18.  
  19. A small dialog box will appear. Enter the text you want to find. The text must
  20. be exact. Regular expressions are not implemented. (Yet.) Using the check boxes
  21. select either a case insensitive search, and/or recursive folder search. (A
  22. recursive folder search, searches folders inside folders, inside folders…) Hit
  23. the return key or click on the OK button. Also select whether or not you would
  24. like the full path name of the file or just the file name displayed. FindIt
  25. remembers the check box selections during a session and between runs.
  26.  
  27. If FindIt finds the text the full path name of the file will be displayed,
  28. along with the line number the text was found on and the line as well.
  29.  
  30. FindIt uses the spinning beach ball cursor trick to let you know how things are
  31. progressing. A little spin for each file.
  32.  
  33. “done.” is printed when FindIt is done searching all the files.
  34.  
  35. Text can be cut, copied or cleared from the display. Cmd-A selects all
  36. the text. Cmd-B clears all the text. Be careful.
  37.  
  38. To search again just drop a folder on the FindIt icon. It may be grayed out
  39. because the application is running. There is no need to quit. The new results
  40. are placed after the old results.
  41.  
  42. For ResEdit Users
  43.  
  44. There isn't much you can change using ResEdit, but you can change the “Found
  45. in:” heading for the path to the file. It's in STR# resource 128 string 1.
  46.  
  47. Limitations
  48.  
  49. The display uses TextEdit to display the found files and lines. FindIt won’t
  50. bomb if you try to stuff more than 32K characters into the display but the
  51. output is truncated. I tested this by finding “;” in the apple header files.
  52.  
  53. The search uses a straight Boyer-Moore text search. I wanted a fast search.
  54. Maybe I’ll put in regular expression searching, if there is a real interest.
  55.  
  56. FindIt searches the files a line at a time. Lines should be less than 2048
  57. characters long.
  58.  
  59. FindIt loads the whole file into a buffer to search it. If FindIt can’t get
  60. a buffer large enough you will get a dialog saying “Not enough memory for x”
  61. where x is some file. Try increasing FindIt’s memory partition.
  62.  
  63. There is some overhead for each file in the list of files to search. This
  64. limits the size of the file that can be searched. The more files you search
  65. the smaller the file you can search. If you encounter this, increase the size
  66. the partition FindIt runs in.
  67.  
  68. If you try to search very deeply nested folders with the recursive folder
  69. search the stack will overflow. By deep I mean an entire CDROM. I can search
  70. the 67 Megs of data on my hard disk in a 256K byte partition with no problems
  71. other than having to skip files too large to fit in memory.
  72.  
  73. Tips
  74.  
  75. I use System 7.0, and I keep an alias to the “Apple includes” next to an alias
  76. of FindIt on the desktop. Any time I need to find out what file to include for
  77. a function prototype, I just drop the Apple includes alias on the FindIt alias.
  78. Since the line is displayed, this is also a good way to display function
  79. prototypes.
  80.  
  81. Legal Stuff
  82.  
  83. Although FindIt is free, it is not “public domain”. It is copyrighted, and
  84. the copyright will be enforced whenever appropriate. 
  85.  
  86. The source is not, and will never be, available. 
  87.  
  88. FindIt cannot be sold, either by itself or in combination with any other
  89. product, without my express written permission. The one exception to this rule
  90. is made for user groups. If you’re a user group which is publishing a CD-ROM or
  91. floppy collection, you may include FindIt and all of its included files without
  92. restriction, save that the original package is included. Contact me for
  93. up-to-date versions and information. 
  94.  
  95. FindIt may be posted on an information service which charges its users for
  96. general connection time and downloading, but it may NOT be posted to an
  97. information service which will charge for the specific right to download
  98. FindIt, without my express written permission.
  99.  
  100. FindIt may be given away as a support utility for a package which is itself
  101. to be given away. People who have need to  distribute FindIt as a support
  102. utility should contact me for up-to-date versions and information.
  103.  
  104. The following warranty is merely to cover the bases: 
  105.  
  106. Geoffrey Clements makes no warranty, express or implied, with respect to the
  107. software or documentation including (but not limited to) implied warranties of
  108. merchantability and fitness for a  particular purpose. In no event will
  109. Geoffrey Clements be liable for loss of profits or goodwill or other indirect,
  110. special, incidental, or consequential damages resulting from any defect in the
  111. software or documentation, even if advised of the possibility of such damages.
  112. Geoffrey Clements shall have no liability for any data stored with this
  113. program, including the costs of recovering such data. 
  114.  
  115. Some states do not allow the exclusion or limitation of implied warranties or
  116. liability for incidental or consequential damages, so the above limitation or
  117. exclusion may not apply  to you. This warranty gives you specific legal rights,
  118. and you may also have other rights which vary from state to state. 
  119.  
  120. FindIt is copyright ©1993 by Geoffrey P. Clements. All rights reserved.
  121.  
  122. History
  123.  
  124. 1.0.0    First Release.
  125.  
  126. 1.0.1    If you allocate memory, you should check to make sure you get it. Duh!
  127.         Fixed some screen handling stuff. Fixed a memory leak.
  128.         
  129. 1.0.2    2/2/93    Added a case insensitive search. Fixed a bug in which FindIt
  130.                 would skip the last file in a folder. Fixed a bug where
  131.                 GetNewCWindow is called even if the machine doesn't have
  132.                 color Quickdraw. Remembering where the window was works
  133.                 better.
  134.  
  135. 1.1.0    2/11/93    Added “Recursive Folder Search” option. (Search folders inside
  136.                 folders.) Always add text at the end of the display. Display
  137.                 “Findit 1.1.0” as the display window title not “Search”
  138.                 Fix the line numbering. Was off by one. Added “Display Full
  139.                 Path Name” option. Increased partition size to 256K. Remember
  140.                 what options where selected for last search. Don't bomb on older
  141.                 machines that don't have Color Quickdraw, or at least pseudo
  142.                 Color Quickdraw like the Classic II has.
  143.                 
  144. 1.1.1    2/93    This should repair a problem with some older Macs in which the
  145.                 machine would bomb because of a Color Quickdraw call on non-
  146.                 color Macs. Corrected a user interface guideline inconsistency.
  147.                 Made Cmd-B clear all, and Cmd-A select all.
  148.  
  149. 1.1.2    4/23/93    There was a small problem with the underlying class library I
  150.                 use to implement applications. The repair is something that
  151.                 may be a problem but hasn't manifested itself yet.
  152.  
  153. Geoffrey Clements
  154.  
  155. Internet:    clementsg@gw1.hanscom.af.mil
  156.  
  157. US postal:    19 Samuel Rd.
  158.             Chelmsford, MA 01824
  159.